home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
VRML 2.0 Sourcebook (2nd Edition)
/
VRML 2.0 Sourcebook CD [md5 fed90f4f9c39d5a60d477058775c7e21].iso
/
book
/
unix
/
ch30
/
30fig05.wrl
< prev
next >
Wrap
Text File
|
1996-09-23
|
904b
|
36 lines
#VRML V2.0 utf8
# The VRML 2.0 Sourcebook
# Copyright [1997] By
# Andrea L. Ames, David R. Nadeau, and John L. Moreland
Group {
children [
# Donut, initially empty
Shape {
appearance Appearance {
material Material { }
}
geometry DEF Donut Extrusion {
crossSection [ ]
spine [ ]
creaseAngle 1.57
beginCap FALSE
endCap FALSE
}
},
# Donut maker
DEF DonutMaker Script {
url "donutmkr.js"
field SFFloat crossSectionRadius 1.0
field SFFloat spineRadius 2.0
field SFInt32 crossSectionResolution 16
field SFInt32 spineResolution 16
eventIn SFFloat set_crossSectionRadius
eventIn SFFloat set_spineRadius
eventOut MFVec2f crossSection_changed
eventOut MFVec3f spine_changed
}
]
}
ROUTE DonutMaker.crossSection_changed TO Donut.set_crossSection
ROUTE DonutMaker.spine_changed TO Donut.set_spine